package com.cyq.day24.myException;

public class Employee {
    private  int num;
    private String name;
    private int age;
    private int salary;
    private long IDnum;
    private int employeenum;
    private int allSalary;

    public Employee() {
    }

    public Employee(int num, String name, int age) throws Exception {
        this.num = num;
        this.name = name;
        this.age = age;
        if (age<18){
            throw new AgeLowException("年龄过小");
        }
        if (age>60){
            throw new AgeOverException("年龄过大");
        }
    }

    public Employee(int salary, long IDnum) throws Exception {
        this.salary = salary;
        this.IDnum = IDnum;
        if (salary<2500){
            throw new LowSalaryException();
        }
    }
    public void addSalary(double addSalary){


    }
    public void minusSalary(double minusSalary){

    }
    public void showTotalSalary(){

    }
    public void showTotalEmployee(){

    }
    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public long getIDnum() {
        return IDnum;
    }

    public void setIDnum(long IDnum) {
        this.IDnum = IDnum;
    }

    public int getEmployeenum() {
        return employeenum;
    }

    public void setEmployeenum(int employeenum) {
        this.employeenum = employeenum;
    }

    public int getAllSalary() {
        return allSalary;
    }

    public void setAllSalary(int allSalary) {
        this.allSalary = allSalary;
    }
}
